<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <style>
        ul {
            border: 1px solid #000;
            padding: 20px;
        }
        
        li {
            border: 1px solid red;
        }
    </style>
</head>

<body>
    <!-- self 事件源时自己才触发事件 stop 停止事件冒泡
    -->
    <div id="app">
        <ul @click.self="clickul">
            <li @click.stop="clickLi1">111</li>
            <li @click="clickLi2">222</li>
            <li @click="clickLi3">333</li>
        </ul>
    </div>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {},
            methods: {
                clickul() {
                    console.log('click ul')

                },
                clickLi1() {

                    console.log('click li1')
                },
                clickLi2() {
                    console.log('click li2')
                },
                clickLi3() {
                    console.log('click li3')
                },
            },
        })
    </script>
</body>

</html>